#ifndef LIST_WIDGET_ITEM_WIDGET_H
#define LIST_WIDGET_ITEM_WIDGET_H

#include <QWidget>

namespace Ui {
class ListWidgetItemWidget;
}

class ListWidgetItemWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ListWidgetItemWidget(QWidget *parent = nullptr);
    ~ListWidgetItemWidget();
    void setText(QString text);
    void hideBtn();
    void showBtn();

private:
    void initEvents();

    #if QT_VERSION <= QT_VERSION_CHECK(5, 15, 2)
    void enterEvent(QEvent *e) override;
    #else
    void enterEvent(QEnterEvent *e) override;
    #endif

    void leaveEvent(QEvent *event) override;

signals:
    void deleteItem();

private:
    Ui::ListWidgetItemWidget *ui;
};

#endif // LIST_WIDGET_ITEM_WIDGET_H
